<!-- 
<template>
  <div id="app">
  <nav>
    <router-link to="/" :style="con">图片管理</router-link> |
      <router-link to="/about" :style="con">用户管理</router-link>|
        <router-link to="/wuliu" :style="con">物流线路管理</router-link>
      </nav>
    <router-view v-if="isShow"></router-view>
  </div>
</template>
<script>

export default {
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      isShow: true,
    }
  },
  methods: {
    reload() {
      this.isShow = false
      this.$nextTick(function () {
        this.isShow = true
      })
    },

  },
  mounted() {
    console.log(this)
    console.log(this.$router)

  }
}
</script>




 -->
<!-- <template>
  <el-container>
    <el-aside width="15%">
      <div class="menu">
        <el-menu default-active="2" class="el-menu-vertical-demo" background-color="#afc5e2" text-color="#fff"
          @select="changeSidebar" active-text-color="#ffd04b">
          <el-menu-item index="image">
            <i class="el-icon-s-custom"></i>
            <span slot="title">图片管理</span>
          </el-menu-item>
          <el-menu-item index="wuliu">
            <i class="el-icon-s-claim"></i>
            <span slot="title">物流线路管理</span>
          </el-menu-item>
          <el-menu-item index="about">
            <i class="el-icon-s-shop"></i>
            <span slot="title">用户管理</span>
          </el-menu-item>
        </el-menu>
      </div>
    </el-aside>
    <el-container class="con">
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>
 
<script>
export default {
  data() {
    return {

    }
  },

  mounted() {
    console.log(this.$router.name)
    this.sidebarItem = this.$route.name;
  },
  methods: {
    changeSidebar(path) {
      console.log(path)
      this.$router.push(path);
    },
  }

}
</script>
 
 
<style scoped>
.menu {
  height: 730px;
  background-color: #afc5e2;
}

.el-header {
  background-color: #afc5e2;
  color: #333;
  font-size: 30px;
  text-align: center;
  line-height: 60px;
}

.el-aside {

  color: #333;
  text-align: center;
  line-height: 900px;
}

.el-main {
  background-color: #cfebe43f;
  color: #333;
  line-height: 160px;
  padding: 0px ! important;
}
</style> -->
<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>

export default {
  data() {
    return {
    }
  },
  watch: {
    $route(to, from) {
      console.log(to, from)
      window.location.reload(); //监测到路由发生跳转时刷新一次页面
    },
  },

  methods: {

  },
  mounted() {
    console.log(this)
    console.log(this.$router)

  }
}
</script>
